home *** CD-ROM | disk | FTP | other *** search
- " -------------------------------------------------------------------- "
- " GadgetFlags Class is a Singleton class that allows the user to "
- " reference Gadget Flags without having to remember their actual "
- " hexadecimal values. "
- ""
- " The User does NOT need to create one of these, since Intuition Class "
- " will instantiate the only needed instance of this Class. See the "
- " SetupIntuition.st source file for the method(s) that help the User "
- " with this Class. "
- ""
- " ALL singleton classes MUST contain the following: "
- ""
- " the methods: isSingleton AND privateSetup AND "
- " uniqueInstance Class instance variable. "
- " -------------------------------------------------------------------- "
-
- Class GadgetFlags :Dictionary ! uniqueInstance !
- [
- isSingleton
- ^ true
- |
- privateNew ! newinstance !
- newinstance <- super new.
-
- ^ newinstance
- |
- new
- ^ (self privateSetup)
- |
- privateSetup
- (uniqueInstance isNil)
- ifTrue: [uniqueInstance <- self privateNew.
-
- " Describe the highlight technique to be used:"
-
- self at: #GFLG_GADGHCOMP put: 0.
- self at: #GFLG_GADGHIGHBITS put: 3. "2r0011 For masking."
- self at: #GFLG_GADGHBOX put: 1.
- self at: #GFLG_GADGHIMAGE put: 2.
- self at: #GFLG_GADGHNONE put: 3.
-
- self at: #GFLG_GADGIMAGE put: 4.
-
- self at: #GFLG_RELBOTTOM put: 8.
- self at: #GFLG_RELRIGHT put: 16r10.
- self at: #GFLG_RELWIDTH put: 16r20.
- self at: #GFLG_RELHEIGHT put: 16r40.
-
- self at: #GFLG_SELECTED put: 16r80.
-
- self at: #GFLG_DISABLED put: 16r100.
- self at: #GFLG_TABCYCLE put: 16r200.
- self at: #GFLG_STRINGEXTEND put: 16r400.
- self at: #GFLG_IMAGEDISABLE put: 16r800.
-
- self at: #GFLG_LABELMASK put: 16r3000. "For masking."
- self at: #GFLG_LABELITEXT put: 0.
- self at: #GFLG_LABELSTRING put: 16r1000.
- self at: #GFLG_LABELIMAGE put: 16r2000.
-
- self at: #GFLG_RELSPECIAL put: 16r4000.
- self at: #GFLG_EXTENDED put: 16r8000.
- ].
-
- ^ self "uniqueInstance??"
- ]
-